package team.freeroom.hotelmanage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import team.freeroom.hotelmanage.repository.entity.Role;
import team.freeroom.hotelmanage.repository.mapper.RoleMapper;
import team.freeroom.hotelmanage.service.RoleService;
import java.util.List;
import java.util.Map;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public int add(Role role) {
        return roleMapper.add(role);
    }

    @Override
    public int edit(Role role) {
        return roleMapper.edit(role);
    }

    @Override
    public int delete(Long id) {
        return roleMapper.delete(id);
    }

    @Override
    public List<Role> findList(Map<String, Object> queryMap) {
        return roleMapper.findList(queryMap);
    }

    @Override
    public int getTotal(Map<String, Object> queryMap) {
        return roleMapper.getTotal(queryMap);
    }

    @Override
    public Role find(Long id) {
        return roleMapper.find(id);
    }
}
